import { buildService, openBuildService } from '../../helper/service';
// 值类型为String或Object,String为url(method),Object同axios(config)参数支持相同,data和params只能为对象类型
const settings = {
    // 通用分类管理-分类树列表
    getCategTree: {
        url: '/adminc/v1/config_manage/b_categ/get_categ_list',
        method: 'get'
    },
    // getInstancePageProId: {//根据项目id获取默认实例
    //   url: '/api/v1/project/get_instance_page_by_project_id',
    //   method: 'get'
    // },
    // 通用分类管理-分类树添加
    createCategTree: {
        url: '/adminc/v1/config_manage/b_categ/create_categ',
        method: 'post'
    },
    // 通用分类管理-分类树修改
    updateCategTree: {
        url: '/adminc/v1/config_manage/b_categ/update_categ',
        method: 'put'
    },
    // 通用分类管理-分类删除
    deleteCategTree: {
        url: '/adminc/v1/config_manage/b_categ/delete_categ',
        method: 'delete'
    },
    // 页面定制-创建页面
    createPage: {
        url: '/adminc/v1/config_manage/b_page_templete/create_page_templete',
        method: 'post'
    },
    // 页面定制-修改页面
    updatePage: {
        url: '/adminc/v1/config_manage/b_page_templete/update_page_templete',
        method: 'put'
    },
    // 页面定制-删除页面
    deletePage: {
        url: '/adminc/v1/config_manage/b_page_templete/delete_page_templete',
        method: 'delete'
    },
    // 页面定制-元素列表
    getComponentList: {
        url: '/adminc/v1/config_manage/b_page_element/get_element_list',
        method: 'get'
    },
    // 页面定制-创建元素
    createComponent: {
        url: '/adminc/v1/config_manage/b_page_element/create_element',
        method: 'post'
    },
    // 页面定制-修改元素
    updateComponent: {
        url: '/adminc/v1/config_manage/b_page_element/update_element',
        method: 'put'
    },
    // 页面定制-删除元素
    deleteComponent: {
        url: '/adminc/v1/config_manage/b_page_element/delete_element',
        method: 'delete'
    },
    // 页面定制-页面列表
    getPageList: {
        url: '/adminc/v1/config_manage/b_page_templete/get_page_templete',
        method: 'get'
    },
    // 页面定制-页面详情
    getPageDetail: {
        url: '/adminc/v1/config_manage/b_page_templete/get_page_templete',
        method: 'get'
    },
    // 页面定制-页面详情-移动端
    getPageDetailMobileAPI: {
        url: '/api/v1/base/b_page_template/get_page_tpl_list',
        method: 'get'
    },
    // 用户页面模板隐藏模块列表-移动端
    getHiddenListMobileAPI: {
        url: '/api/v1/base/b_page_tpl_user_status/hidden_list',
        method: 'get'
    },
    // 用户页面模板模块调整（位置拖动/隐藏显示）-保存
    saveModuleMobileAPI: {
        url: '/api/v1/base/b_page_tpl_user/update',
        method: 'put'
    },
    // 页面定制-模块列表
    getMoudleList: {
        url: '/adminc/v1/config_manage/b_page_moudle/get_moudle_list',
        method: 'get'
    },
    // 页面定制-创建模块
    createMoudle: {
        url: '/adminc/v1/config_manage/b_page_moudle/create_moudle',
        method: 'post'
    },
    // 页面定制-修改模块
    updateMoudle: {
        url: '/adminc/v1/config_manage/b_page_moudle/update_moudle',
        method: 'put'
    },
    // 页面定制-删除模块
    deleteMoudle: {
        url: '/adminc/v1/config_manage/b_page_moudle/delete_moudle',
        method: 'delete'
    },
    // 页面定制-获取实例化详情
    getInstanceDetail: {
        url: '/adminc/v1/config_manage/b_instance_page/get_instance_detail',
        method: 'get'
    },
    // 页面定制-创建实例化
    createInstance: {
        url: '/adminc/v1/config_manage/b_instance_page/create_instance',
        method: 'post'
    },
    // 页面定制-修改实例化
    updateInstance: {
        url: '/adminc/v1/config_manage/b_instance_page/update_instance',
        method: 'post'
    },
    // 页面定制-删除实例化
    deleteInstance: {
        url: '/adminc/v1/config_manage/b_instance_page/delete_instance',
        method: 'delete'
    },
    //大屏-在册人员组件
    onRegPersonPieChart: {
        url: '/intecons/api/v1/screen/all_screen/on_reg_person_pie_chart',
        method: 'post'
    },
    alarmListEarly: { //预警消息【对应数字块：dzcl-yjxx（大宗材料-预警消息）】
        url: '/intecons/api/v3/screen/alarm/alarm_list',
        method: 'get'
    },
    // 大屏-获取数据
    getScreenData: {
        url: '/api/v1/screen/screen_index_data/get_index_data_list',
        method: 'post'
    },
    //多级联动组件
    getLinkageData: {
        url: 'plat/api/v1/project/wbs_list',
        method: 'get'
    },
    getMechEquipOperaStatusAPI: {
        url: '/intecons/api/v1/tower/opera',
        method: 'get'
    },
    getNoticeWarningAPI: {
        url: 'intecons/api/v1/tower/earlyList',
        method: 'get'
    },
    getAlarmWarningAPI: {
        url: 'intecons/api/v1/tower/alarmList',
        method: 'get'
    },
    getTowerStatusDataAPI: {
        url: 'intecons/api/v1/tower/towerList',
        method: 'post'
    },
    // 扬尘播报
    getDustListAPI: {
        url: 'intecons/api/v1/environment/dustList',
        method: 'post'
    },

    // 劳务状况
    getServiceStatusNewAPI: {
        url: 'intecons/api/v1/gldemployee/personalList',
        method: 'post'
    },
    // 供料偏差，材料物资管理
    getMaterialManagementNewAPI: {
        url: 'balance/api/v1/work/e_truck_io/biasList',
        method: 'post'
    },
    // 材料名称列表
    getMaterialList: {
        url: 'balance/api/v2/materiel/materielList',
        method: 'get'
    },
    // 获取所有项目
    getAllProjectListAPI: {
        url: 'plat/api/v1/project/get_project_name',
        method: 'get'
    },
    // 获取市级项目数量
    getProvinceMapProjectNumAPI: {
        url: 'intecons/api/v1/gldemployee/nameNum',
        method: 'post'
    },
    //测斜实时监测数据
    getMonitoDataIncliImplementAPI: {
        url: 'intecons/admin/api/v1/monitor_equip/frh/runtime_chart',
        method: 'get'
    },
    //测斜累计监测数据图表-下拉数据
    getHighArr: {
        url: 'intecons/admin/api/v1/monitor_equip/frh/high_box_list',
        method: 'get'
    },
    //测斜累计监测数据图表-数据列表
    getAccountMonitorApi: {
        url: 'intecons/admin/api/v1/monitor_equip/frh/total_chart',
        method: 'get'
    },
    // 短token获取长token
    getAccessToken: {
        url: '/api/v1/access/token/get_access_token_by_short',
        method: 'post'
    },
    // 项目列表
    getProjectList: {
        url: 'plat/api/v1/project/project_list',
        method: 'get'
    },
    // 天气接口
    getWeather: {
        url: 'plat/api/v1/weather/get_weather',
        method: 'get'
    },
    // 检查项业务列表
    getBusinessList: {
        url: 'plat/web/v1/common_check/check_tpl/business_list',
        method: 'get'
    },
    // 获取小程序表单数据
    getBusinessTable: {
        url: 'plat/web/v1/common_check/check_tpl/first_form_list',
        method: 'post'
    },
    // 自定义表格-保存
    saveCustomTable: {
        url: 'plat/web/v1/common_check/custom_report/save',
        method: 'post'
    },
    // 自定义表格-详情
    customTableDetail: {
        url: 'plat/web/v1/common_check/custom_report/detail',
        method: 'get'
    },
    // 自定义表格-列表
    getCustomTableList: {
        url: 'plat/web/v1/common_check/custom_report/list',
        method: 'get'
    },
    // 自定义报表-检查记录详情
    getCheckRecordDetail: {
        url: 'plat/web/v1/common_check/check_record/detail_list',
        method: 'get'
    },
    // 大屏-获取本单位及下级单位id集合
    getCompanyIds: {
        url: '/adminc/v1/organization_manage/o_company_rela/next_or_all_children',
        method: 'get'
    },
    // 大屏-获取数字块表头
    getUnitTitleList: {
        url: '/api/v1/screen/screen_index/unit_title_list',
        method: 'get'
    },
    // 大屏-获取分公司单位及下级项目id集合
    getSubProjectIds: {
        url: 'plat/api/v1/project/list_by_org_no',
        method: 'get'
    },
    // 建投劳务大屏-劳务人员
    getLaborStat: {
        url: 'intecons/api/v1/person/worker/labor_stat',
        method: 'post'
    },
    // 选择项目功能
    getProjectTree: {
        url: 'plat/api/v1/screen/org_project_tree',
        method: 'get'
    },
    //单位详细信息
    getCompDetail: {
        url: '/adminc/v1/organ/organ_manage/get_comp_detail',
        method: 'get'
    },
    // 获取形象进度模板列表
    getImageProgressTemplate: {
        url: 'intecons/admin/api/v1/image/list',
        method: 'get'
    },
    // 获取形象进度模板下节点列表
    getImageProgressNode: {
        url: 'intecons/admin/api/v1/image/node_list',
        method: 'get'
    },
    // 获取物料出入库数据
    getMaterialinoutStatics: {
        url: 'io/api/v1/screen/materiel_total',
        method: 'get'
    },
    // 获取物料出入库月度环比趋势
    getMaterialIOTrend: {
        url: 'io/api/v1/screen/materiel_month',
        method: 'get'
    },
    // 获取物料动态
    getMaterialDynamic: {
        url: 'io/api/v1/materiel/dynamic',
        method: 'get'
    },
    // 物料分类列表
    getMaterialType: {
        url: 'io/api/v1/screen/type_list',
        method: 'get'
    },
    // 获取密钥
    getKey: {
        url: "/api/v1/access/access_system/get_key",
        method: "post"
    },
    // 登录
    login: {
        url: "/api/v1/access/login/do_login",
        method: "post"
    },
    // 获取二维码二进制流
    getQrcodeStream: {
        url: 'intecons/api/v1/feature/site/station/qrcode',
        method: 'get',
        responseType: 'blob'
    },
    // 未来工地-人员入场
    getWorkerIn: {
        url: 'intecons/api/v1/feature/alarm_worker_rela/enter_stat',
        method: 'get'
    },
    // 未来工地-访客人员入场
    getVisitorIn: {
        url: 'intecons/api/v1/feature/alarm_worker_rela/guest_enter_stat',
        method: 'get'
    },
};
const storeSettings = {
    // 物料收发存-树形
    getMaterialTypeTree: {
        url: '/web/v1/materiel_type/tree',
        method: 'get'
    },
    // // 物料表-列表-动态表头[1]
    getMaterialTableHeaderAPI: {
        method: 'GET',
        url: '/web/v1/materiel/title_list'
    },
    //全局功能-物料帮助-物料表-列表[1]
    getMaterialHelpDialogListAPI: {
        method: 'GET',
        url: '/web/v1/materiel/list'
    },
}
const platSettings = {
    //根据关联单位、单位、组织编码、项目id获取对应单位、组织、项目数据
    getProComOrgProId: {
        url: 'api/v1/screen/get_project_list_by_company_id_or_org_no_or_project_id',
        method: 'get',
    },
    //大屏-项目信息、参加单位、工期
    getProjectInfoNoToken: {
        url: '/api/v1/project/get_project_info_no_token',
        method: 'get'
    },
    // 项-首页-钢筋采购数量
    materielInCount: {
        url: 'http://console_api.hibuilding.cn/io/api/v1/all_screen/materiel_in_count',
        method: 'get'
    },
}
export default {...buildService(settings), ...openBuildService(storeSettings) };